import unittest
from unittestreport import TestRunner

suit = unittest.defaultTestLoader.discover(r'C:\Users\42502\Desktop\python\testcases')

runner = TestRunner(suit,filename="report.html",
                 report_dir=r"C:\Users\42502\Desktop\1112python\reports",)#设置生成报告的路径

runner.run()